<?php

namespace common\models\hospital;

use Yii;

/**
 * This is the model class for table "{{%register_fee}}".
 *
 * @property int $id
 * @property int|null $project_id
 * @property string|null $patient_card_id 患者卡号
 * @property float|null $register_fee 挂号费
 * @property int|null $yy_clinic_id 中转库诊室id
 * @property string|null $yy_clinic_name 奕远诊室名
 * @property int|null $clinic_id 白友诊室id
 * @property int|null $serial_no 奕远挂号主键id
 * @property int|null $registration_time 挂号时间
 * @property int|null $status 1 = 正常, 0 = 退号
 * @property int|null $created_at
 * @property int|null $updated_at
 */
class RegisterFee extends \common\models\BaseModel
{

    const TYPE_REGISTER = 1; // 挂号
    const TYPE_REGISTER_OUT = 0; // 退号

    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%register_fee}}';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['id', 'project_id', 'yy_clinic_id', 'clinic_id', 'serial_no', 'registration_time', 'status', 'created_at', 'updated_at'], 'integer'],
            [['register_fee'], 'number'],
            [['patient_card_id', 'yy_clinic_name'], 'string', 'max' => 50],
            [['id'], 'unique'],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'project_id' => 'Project ID',
            'patient_card_id' => 'Patient Card ID',
            'register_fee' => 'Register Fee',
            'yy_clinic_id' => 'Yy Clinic ID',
            'yy_clinic_name' => 'Yy Clinic Name',
            'clinic_id' => 'Clinic ID',
            'serial_no' => 'Serial No',
            'registration_time' => 'Registration Time',
            'status' => 'Status',
            'created_at' => 'Created At',
            'updated_at' => 'Updated At',
        ];
    }
}
